﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Computer
    {
        private string name;

        public Computer(string name)
        {
            this.name = name;
        }

        public string Name { get => name; set => name = value; }


        public int Check()
        {
            Random ran = new Random();
            int num = ran.Next(1, 4);
            switch (num)
            {
                case 1:
                    Console.WriteLine("{0}:出拳：剪刀", name);
                    break;
                case 2:
                    Console.WriteLine("{0}:出拳：石头", name);
                    break;
                case 3:
                    Console.WriteLine("{0}:出拳：布", name);
                    break;
            }
            return num;
        }
    }
}
